package com.atguigu.yygh.msm;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.ComponentScan;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * 短信服务不需要连接数据库,所以不需要配置DataSource的相关参数,但是直接或间接的方式添加了数据源的依赖
 * (mysql驱动包,mybatis框架)
 * 加了依赖 但是没有配置参数
 * 解决办法: 排除依赖 or 排除datasource的自动配置
 * 在启动类上
 * @SpringBootApplication(exclude=DataSourceAutoConfiguration.class)  排除数据源的自动配置
 */
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@EnableDiscoveryClient
@EnableFeignClients(value = "com.atguigu")
@ComponentScan(basePackages = "com.atguigu")
@EnableSwagger2
public class ServiceMsmApplication {
    public static void main(String[] args) {
        SpringApplication.run(ServiceMsmApplication.class,args);
    }
}
